package client;

import java.awt.EventQueue;
import client.Client;


public class Dobble {
	
	// #################### ATTRIBUTS ####################
	private Client client;
	private DobbleGUI gui;
	private InterfaceClientGUI interfaceCG = new InterfaceClientGUI();
	
	
	// #################### CONSTRUCTEURS ####################
	public Dobble() {
		
		client = new Client(8080, interfaceCG);
		interfaceCG.setComponents(gui, client);
		//Utilise un autre thread pour modifier l'UI
		EventQueue.invokeLater(new Runnable() {
			
			public void run() {
				
				gui = new DobbleGUI(interfaceCG);	
				interfaceCG.setComponents(gui, client);
			}
		});
		
	}
	
	
	// #################### MAIN ####################
	public static void main(String[] args) {		
		new Dobble();
	}
}
